<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<html>
<head>
<%@ include file="common.jsp"%>

<title><%=proName%></title>
<link type="text/css" rel="stylesheet"
	href="<%=rootPath%>/css/manage/selectResult.css" />
	<link type="text/css" rel="stylesheet"
	href="<%=rootPath%>/css/manage/materialEdit.css" />
<script type="text/javascript" src="<%=rootPath%>/js/manage/wxMaterialEditNews.js"></script>
</head>

<body>
	<jsp:include page="./menu.jsp"></jsp:include>
	<div id="body">
		<div id="navTop">
			<div class="bg_left"></div>
			<div class="bg_main"></div>
			<div class="bg_right"></div>
		</div>
		<div id="userManager">
			<table width="100%" cellpadding="0" cellspacing="0" border="0"
				class="maintable">
				<tr>
					<th colspan="4" align="left" valign="middle">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<th><span id="search_icon" class="search_icon"></span></th>
								<th height="30px"><span style="margin-left: 2px;">素材管理</span>
								</th>
							</tr>
						</table>
					</th>
				</tr>
				<tr>
					<td colspan="4" align="left" valign="middle">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<th height="30px"><input id="tab_news" type="button"
									onclick="goToManagePage('${appid}')"
									class="ui-button ui-widget ui-state-default ui-corner-all"
									role="button" aria-disabled="false" value="图文消息"
									onmouseover="this.style.background='#FFF18B'"
									onmouseout="this.style.background='#F1EDD2'"
									style="background: #FFF18B" /></th>
<!-- 								<th height="30px"><input id="tab_image" type="button" -->
<!-- 									onclick="addManyArticles()" -->
<!-- 									class="ui-button ui-widget ui-state-default ui-corner-all" -->
<!-- 									role="button" aria-disabled="false" value="图片库" -->
<!-- 									onmouseover="this.style.background='#FFF18B'" -->
<!-- 									onmouseout="this.style.background='#F1EDD2'" disabled="disabled"/></th> -->
<!-- 								<th height="30px"><input id="reset" type="button" -->
<!-- 									onclick="addManyArticles()" -->
<!-- 									class="ui-button ui-widget ui-state-default ui-corner-all" -->
<!-- 									role="button" aria-disabled="false" value="语音" -->
<!-- 									onmouseover="this.style.background='#FFF18B'" -->
<!-- 									onmouseout="this.style.background='#F1EDD2'" disabled="disabled"/></th> -->
<!-- 								<th height="30px"><input id="reset" type="button" -->
<!-- 									onclick="addManyArticles()" -->
<!-- 									class="ui-button ui-widget ui-state-default ui-corner-all" -->
<!-- 									role="button" aria-disabled="false" value="视频" -->
<!-- 									onmouseover="this.style.background='#FFF18B'" -->
<!-- 									onmouseout="this.style.background='#F1EDD2'" disabled="disabled"/></th> -->
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<table id="newRule" class="maintable" width="95%"
							cellpadding="0px" cellspacing="25px"
							style="margin-left: auto; border: 0px #ccc solid; margin-bottom: 20px; display: block; float: left;">
							<tr><td>新建图文消息</td></tr>
							<tr>
								<td id="" valign="top" style="width: 33%">

									<table id="newRule" class="maintable" width="100%"
										cellpadding="0px" cellspacing="25px"
										style="margin-left: auto; margin-bottom: 20px;">
										<tr>
											<td id="col_1" valign="top" style="width: 33%">
												<table id="articleModel" class="maintable" width="100%" style="margin-left: 3%; border: 1px #ccc solid; margin-bottom: 20px;">
													<tr id="article_0" style="height: 174px;">
														<td>
															<div class="firstaticle"  onmouseover="showEdit('article_edit_0')" onmouseout="hideEdit('article_edit_0')">
																<table width="100%">
																	<tr>
																		<th>
																			<div class="content" >
																				<img id="article_img_0" src="" />
																				<div id="article_thumb_0" class="cover" >封面</div>
																				<div class="title" >
																					<h2 id="article_title_0">标题</h2>
																				</div>
																			</div>
																		</th>
																	</tr>
																</table>
																<div class="eidt_mask" id="article_edit_0">
																	<a href="javascript:editArticle('0')">编辑</a>
																</div>
															</div>
														</td>
													</tr>
													<tr id="article_1" style="height: 80px;position: relative;" >
														<td >
															<div class="article_item" onmouseover="showEdit('article_edit_1')" onmouseout="hideEdit('article_edit_1')">
																<table width="100%" >
																	<tr>
																		<td><div style="width: 172px;overflow: hidden;max-height: 42px;">
																			<h2 id="article_title_1" class="title">标题</h2>
																			</div>
																		</td>
																		<td width="30%">
																			<div style="height: 78px;overflow: hidden;">
																				<img id="article_img_1" src=""  />
																				<div id="article_thumb_1" class="thumb" >缩略图</div>
																			</div>
																		</td>
																	</tr>
																</table>
																<div class="edit_item" id="article_edit_1">
																	<a href="javascript:editArticle('1')">编辑</a>&nbsp;&nbsp;&nbsp;<a href="javascript:deleteArticle('1')">删除</a>
																</div>
															</div>
														</td>
													</tr>
													<tr>
														<td style="cursor: pointer;border: 1px dotted black;background: #CCC" align="center" onclick="addNewArticle()"><font size="16">+</font></td>
													</tr>
												</table>
											</td >
											<td id="col_2" valign="top" style="width: 66%">
												<form id="materialForm" action="<%=rootPath %>/material/add.mge" method="post" class="form">
												<input type="hidden" name="appid" value="${appid }"/>
												<input type="hidden" name="materialType" value="news"/>
												<table id="form_article_0" class="maintable" width="100%" style="display: block;">
													<tr style="height: 30px;">
														<td>标题:</td>
														<td>
															<input id="title_0" type="text" name="articles[0].title" onkeyup="showTitle('0')"/>
															<input type="hidden" name="articles[0].order" value="0"/>
															<span class="hint" id="hint_title_0"></span>
														</td>
													</tr>
													<tr style="height: 30px;">
														<td>描述:</td>
														<td >
															<textarea id="description_0" rows="2" cols="30" name="articles[0].description"></textarea>
															<span class="hint" id="hint_description_0"></span>
														</td> 
													</tr>
													<tr style="height: 30px;">
														<td>封面:</td>
														<td>
															<input type="file" id="file_0" name="fileToUpload" onchange="uploadPic('file_0')" class="file"/>
															<input type="button" onclick="selectfile('file_0')" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" aria-disabled="false" value="上传"/>
															<input id="pic_0" type="hidden" name="articles[0].picUrl"/>
															<span class="hint" id="hint_cover_0"></span>
														</td>
													</tr>
													<tr id="showCover_0" style="height: 80px;display: none;">
														<td>&nbsp;</td>
														<td>
															<div id="showPic_0" style="height: 80px;overflow: hidden;float: left;">
															<img id="img_0" src="" width="70px" />
															</div>
															<a href="javascript:deletePic('pic_0')" style="line-height: 80px;margin-left: 15px;">删除</a>
														</td>
													</tr>
													<tr style="height: 30px;">
														<td>连接地址:</td>
														<td><input id="url_0" type="text" name="articles[0].url"/><span class="hint" id="hint_url_0"></span></td>
													</tr>
												</table>
												<table id="form_article_1" class="maintable" width="100%" style="margin-top: 174px;display: none;">
													<tr style="height: 30px;">
														<td>标题:</td>
														<td>
															<input id="title_1" type="text" name="articles[1].title" onkeyup="showTitle('1')"/>
															<input type="hidden" name="articles[1].order" value="1"/>
															<span class="hint" id="hint_title_1"></span>
														</td>
													</tr>
													<tr style="height: 30px;">
														<td>描述:</td>
														<td >
															<textarea id="description_1" rows="2" cols="30" name="articles[1].description"></textarea>
															<span class="hint" id="hint_description_1"></span>
														</td> 
													</tr>
													<tr style="height: 30px;">
														<td>封面:</td>
														<td>
															<input type="file" id="file_1" name="fileToUpload" onchange="uploadPic('file_1')" class="file"/>
															<input type="button" onclick="selectfile('file_1')" class="ui-button ui-widget ui-state-default ui-corner-all" role="button" aria-disabled="false" value="上传"/>
															<input id="pic_1" type="hidden" name="articles[1].picUrl"/>
															<span class="hint" id="hint_cover_1"></span>
														</td>
													</tr>
													<tr id="showCover_1"  style="height: 80px;display: none;">
														<td>&nbsp;</td>
														<td>
															<div id="showPic_1" style="height: 80px;overflow: hidden;float: left;">
															<img id="img_1" src="" width="70px" />
															</div>
															<a href="javascript:deletePic('pic_1')" style="line-height: 80px;margin-left: 15px;">删除</a>
														</td>
													</tr>
													<tr style="height: 30px;">
														<td>连接地址:</td>
														<td><input id="url_1" type="text" name="articles[1].url"/><span class="hint" id="hint_url_1"></span></td>
													</tr>
												</table>
												</form>
											</td>
										</tr>
										<tr><td align="center" colspan="2" style="border-top: 1px solid #ccc;padding-top: 5px;">
											<input id="reset" type="button"
											onclick="addManyArticles()"
											class="ui-button ui-widget ui-state-default ui-corner-all"
											role="button" aria-disabled="false" value="保存"
											onmouseover="this.style.background='#FFF18B'"
											onmouseout="this.style.background='#F1EDD2'" />
										</td></tr>
									</table> <!-- tianjia guize biao end -->
									<iframe id="fileUploadResult" name="fileUploadResult" style="display: none;"></iframe>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<div id="pagernav"></div>
			<div id="rolesDialog" style="display: none; height: 300px">
				<div id="treeScroll">
					<div id="treebox_group"></div>
				</div>
			</div>
		</div>
	</div>
	<jsp:include page="./footer.jsp"></jsp:include>
</body>
</html>
